import request from '@/utils/request.js'
/**
 *  获取图片验证码
 * @returns clientToken 路径参数
 */
export const getAuthCode = (clientToken) => request({
  url: `/api/user-service/user/imageCode/${clientToken}`,
  responseType: 'blob'
})
/**
 *  登录
 * @param {loginName password code clientToken loginType} data
 * @returns promise
 */
export const userLogin = data => request({
  method: 'POST',
  url: `/api/user-service/user/login`,
  data
})
/**
 * 获取用户基本信息
 * @param {*} id 用户id
 * @returns promise
 */
export const getUserInfo = id => request({
  url: `/api/user-service/user/${id}`
})
